<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/12/26 0026
 * Time: 上午 10:09
 */

namespace Admin\Controller;


use Think\Page;

class MoneyController extends BaseController
{
    function index(){
        $supplier_id=session('supplier_id');
        $count=M('supplier_stream')->where('supplier_id='.$supplier_id)->count();
        $page=new Page($count,10);
        $arr=M('supplier_stream')->where('supplier_id='.$supplier_id)->limit($page->firstRow,$page->listRows)->select();
        $Page=$page->show();
        $type='';
        foreach($arr as $k=>$v){
            if($v['type']==0){
                $type='订单收入';
            }elseif ($v['type']==1){
                $type='提现支出';
            }
            $arr[$k]['types']=$type;
        }
        $this->assign('arr',$arr);
        $this->assign('page',$Page);
        $this->display();
    }
}